package com.rd.student.jike.class2.lihongming.week731_806.Day0731;

/**
 * @Auther:Heinrich
 * @Date:2023/7/31-07-31-15:21
 * @Description:c230731.test
 * @version:1.0
 */
public class test02 {
    public static void main(String[] args) {
        for (int i = 0; i < 20; i++) {
            boolean temp =false;
            int a = (int) (Math.random()*50);
            int[] array = new int[20];
            for (int j = 0; j < i; j++) {
                if(a==array[j]){
                    temp =true;
                    break;
                }
            }
            if(temp){
                i--;
                continue;
            }
            array[i] = a;
            System.out.print(a+" ");
        }
    }
}
